<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?>
<?php include template("content","header"); ?>

<style>
  .pagenum{ padding-top:30px; padding-bottom:80px;}
.pagenum ul li{ float:left; margin-right:10px;}
.pagenum ul li a{ display:block; height:28px; line-height:29px; padding:0 10px; border:1px solid #e5e5e5; color:#8d8d8d;}
.pagenum ul li a:hover{background:#eee;}
.pagenum ul li.active{ background:#8e0f15; height:28px; line-height:29px; padding:0 10px; border:1px solid #8e0f15; color:#fff;}
</style>

<section>
   <div id="list_index" class="w1000 mc">
       <div class="mbx">
          <a href="<?php echo siteurl($siteid);?>">首页</a><span></span><?php echo catpos($catid);?>
       </div>
        <?php $n=1;if(is_array(subcat($catid))) foreach(subcat($catid) AS $v) { ?>
        <?php if($v[catname]==正文) { ?>
       <div class="list_l fl index_border">
           <div class="top_bg"></div>
             <ul class="mc">
                 <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=dce7dd1ad6eaa24cf4c59f190857713f&action=lists&catid=%24v%5Bcatid%5D&num=25&order=id+desc&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$pagesize = 25;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('catid'=>$v[catid],'order'=>'id desc','limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($content_total, $page, $pagesize, $urlrule);$data = $content_tag->lists(array('catid'=>$v[catid],'order'=>'id desc','limit'=>$offset.",".$pagesize,'action'=>'lists',));}?>
                <?php $n=1;if(is_array($data)) foreach($data AS $v) { ?>
                  <li><a href="<?php echo $v['url'];?>"><?php echo $v['title'];?></a><span class="rt">[<?php echo date('Y-m-d',$v[inputtime]);?>]</span></li>
                <?php $n++;}unset($n); ?>
               <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
             </ul>
       </div>
        <?php } ?>
  <?php $n++;}unset($n); ?>

       <div class="list_r fr">
          <div class="list_r_1 index_border">
               <div class="top_bg"></div>
               <div class="sidr_title mc">
                  <h2>通知公告</h2>
               </div>
               <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=4eeb8059c0ad5525e3c232dc1b2d9b98&action=lists&catid=104&order=id+DESC&num=25&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$tag_cache_name = md5(implode('&',array('catid'=>'104','order'=>'id DESC',)).'4eeb8059c0ad5525e3c232dc1b2d9b98');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$data = $content_tag->lists(array('catid'=>'104','order'=>'id DESC','limit'=>'25',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
           <ul class="mc">
           <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
              <li><a href="<?php echo $r['url'];?>"><?php echo $r['title'];?></a></li>
              <?php $n++;}unset($n); ?>
           </ul>
           <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
           </div>

           <div class="list_r_2 index_border">
               <div class="top_bg"></div>
               <div class="sidr_title mc">
                  <h2>热门排行</h2>
               </div>
               <ul class="mc">
                  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=4b0fd39c919c2f416fc1618d642976b1&action=hits&num=10&order=views+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$tag_cache_name = md5(implode('&',array('order'=>'views DESC',)).'4b0fd39c919c2f416fc1618d642976b1');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('order'=>'views DESC','limit'=>'10',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
        <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
          <li><a href="<?php echo $r['url'];?>" target="_blank" title="<?php echo $r['title'];?>"><?php echo str_cut($r[title], 28, '');?></a></li>
        <?php $n++;}unset($n); ?>
      <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
               </ul>
           </div>

       </div>
       <div class="clear"></div>
       <!--页码-->
       <div class="pagenum">
       <ul>
          <?php
            $str = $pages;
            $str = preg_replace("/(<a.*?>.*?<\/a>)??/", '', $str, 2);
            $str = str_replace('<a','<li><a',$str);
            $str = str_replace("</a>","</a></li>",$str);
            $str = str_replace("<span>",'<li class="active">',$str);
            $str = str_replace("</span>",'</li>',$str);
            $str = str_replace("..",'<li><a>..</a></li>',$str);
          ?>

          <?php echo $str;?>
        </ul>
       </div>
   </div>
</section>

<footer>
<div id="footer" class="w100p">
   <div class="footer w1000 mc">
       <p>SCAU Copyright ©  2012 国际教育学院.All rights reserved. </p>
       <p>地址:广东省天河区五山路486号 邮编:510642 </p>
       <p><span>Tel:+8620 85283482</span> <span>+8620 38675621</span> <span>Fax:+8620 85283114</span> <span>E-Mail:cie@scau.edu.cn</span></p>
       <a href="#">后台管理</a>
   </div>
</div>
</footer>

</body>
</html>
